'use strict';

import React, {Component} from 'react';
import {bindActionCreators} from 'redux';
import * as rootAction from '../actions/root';
import {connect} from 'react-redux';

import Root from '../page';

class RootContainer extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    const {state, actions, dispatch} = this.props;
    return(
      <Root
        tabbarHidden={state.tabbarHidden}
        {...this.props}
        {...actions} />
    );
  }

}

export default connect(
  state => ({state: state.root}),
  (dispatch) => ({actions: bindActionCreators(rootAction, dispatch)})
)(RootContainer);
